# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
#
# This PKGBUILD was extracted from AUR.
# Creator: Jakob Nixdorf <flocke@shadowice.org>
# Changes by: petruknisme

pkgname=perl-struct-dumb
_pkgname=Struct-Dumb
pkgver=0.12
pkgrel=6
pkgdesc='Make simple lightweight record-like structures.'
arch=('any')
url='http://search.cpan.org/dist/Struct-Dumb'
license=('GPL' 'PerlArtistic')
depends=('perl')
makedepends=('perl-module-build')
options=('!emptydirs')
source=("http://search.cpan.org/CPAN/authors/id/P/PE/PEVANS/$_pkgname-$pkgver.tar.gz")
sha512sums=('52b8e2e7b0f073d1e24c941529989f1bd94d29e8c84abfc811baf3955bba5951b235128953260a149e9e52ee31c0759498cc9c3a283e350e618e8b004e50a132')

build() {
  cd "$_pkgname-$pkgver"

  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB="" PERL_AUTOINSTALL=--skipdeps \
    PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \
    PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
    MODULEBUILDRC=/dev/null

    /usr/bin/perl Build.PL
  )
}

package() {
  cd "$_pkgname-$pkgver"

  /usr/bin/perl Build install

  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}

